package tec.stan.ling.topo.graph;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;

import tec.stan.ling.core.top.model.NE;
import tec.stan.ling.core.top.model.Node;
import tec.stan.ling.core.top.model.Subnet;

/**
 * 
 * 
 * @author Stan 张新潮
 * @date Jan 14, 2010
 */
public class TopoEditInput implements IEditorInput {

	private NE element;

	private Subnet subnet;

	public TopoEditInput(NE element) {
		this.element = element;
		if (element instanceof Subnet) {
			subnet = (Subnet) element;
		} else {
			subnet = ((Node) element).getParent();
		}
	}

	public Subnet getObject() {
		return subnet;
	}

	@Override
	public boolean exists() {
		return false;
	}

	@Override
	public ImageDescriptor getImageDescriptor() {
		return null;
	}

	@Override
	public String getName() {
		return "Topo";
	}

	@Override
	public IPersistableElement getPersistable() {
		return null;
	}

	@Override
	public String getToolTipText() {
		return "";
	}

	@SuppressWarnings("unchecked")
	@Override
	public Object getAdapter(Class adapter) {
		return null;
	}

}
